package demo;

import org.springframework.stereotype.Component;


public class User extends Person{
    String password;

    public User() {
    }

    public User(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }
    @Override
    public String toString() {
        return "User{password = " + password + "}";
    }
    @Override
    public void sayHello() {
        System.out.println("hello world");
    }
    public void sayHi() {
        System.out.println("hi");
    }
}
